/*
*Copyright (c) Nikhil Jain.
*Project ICARUS, communications and 
*artificial intelligence.
*/



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package javadrone.client.simulator;

//~--- non-JDK imports --------------------------------------------------------

import simbad.gui.SimulatorControlGUI;
import simbad.gui.WorldControlGUI;

import simbad.sim.Simulator;
import simbad.sim.World;

//~--- JDK imports ------------------------------------------------------------

import javax.swing.BoxLayout;
import javax.swing.JFrame;

/**
 *
 * @author Nikzzay
 */
import javax.swing.JInternalFrame;
import javax.swing.JPanel;

/*
* A Container for all the control panels (world, simulator).
* @author Louis Hugues
 */
public class DisabledControlWindow extends JInternalFrame {
    private static final long serialVersionUID = 1L;
    private Simulator         sim;

    public DisabledControlWindow(World world, Simulator simulator) {
        super("Control");
        createGui(world, simulator);
        this.sim = simulator;
    }

    private void createGui(World world, Simulator simulator) {
        JPanel panel = new JPanel();

        setContentPane(panel);
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
        panel.add(new WorldControlGUI(world, simulator));
        panel.add(new DisabledSimulatorControlGUI((JFrame) getParent(), simulator));
        pack();
    }

    public void startSimulation() {
        sim.startSimulation();
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
